//
//  BJCoinStoreListCollectionViewCell.m
//  BowJoy
//
//  Created by  on 2024/5/16.
//

#import "BJCoinStoreListCollectionViewCell.h"

@implementation BJCoinStoreListCollectionViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setModel:(BJGoodsSearchModelData *)model{
    self.coinNumL.text = [NSString stringWithFormat:@"%ld",(long)model.exchangeCoin];
    self.priceL.text = [NSString stringWithFormat:@"$%.2f",model.price];
    self.originalPriceL.text = [NSString stringWithFormat:@"$%.2f",model.originalPrice];

    if(model.discount>0){
        self.percentView.hidden = NO;
        self.percentL.text = [NSString stringWithFormat:@"%.f%%",model.discount*100];
    }else{
        self.percentView.hidden = YES;
    }
  
    if ([model.tags isEqualToString:@""]||model.tags == nil) {
        self.hotView.hidden = YES;
    }else{
        self.hotLable.text = model.tags;
        self.hotView.hidden = NO;

    }

}
@end
